<html>
	<head>
		<script type="text/javascript" src="https://www.google.com/jsapi"></script>
		<script type="text/javascript">
			google.load("feeds", "1");
		</script>

		<script type="text/javascript">
			/*
  			google.load("feeds", "1");

  			function initialize() {
				//var feed = new google.feeds.Feed("http://fastpshb.appspot.com/feed/1/fastpshb");

				var feed = new google.feeds.Feed("http://dlc0421.googlepages.com/gfss.rss");
				//feed.includeHistoricalEntries(); // tell the API we want to have old entries too
				feed.setNumEntries(250);
				//feed.setResultFormat(google.feeds.Feed.XML_FORMAT);
				feed.load(function(result) {
					if (!result.error) {
						var container = document.getElementById("feed");
						for (var i = 0; i < result.feed.entries.length; i++) {
							var entry = result.feed.entries[i];
							var div = document.createElement("div");
							div.appendChild(document.createTextNode(entry.content));
							container.appendChild(div);
						}
					}
				});
			}
  		    google.setOnLoadCallback(initialize);
  			*/
		</script>
		
		<script type="text/javascript">
			function OnLoad() {
				// Query for president feeds on cnn.com
				//var query = 'site:cnn.com president';
				var query = 'site:cnn.com ipod';
				google.feeds.findFeeds(query, findDone);
			}

			function findDone(result) {
				// Make sure we didn't get an error.
				if (!result.error) {
				    // Get content div
					var container = document.getElementById("feed");
					var html = '';
	
					// Loop through the results and print out the title of the feed and link to
					// the url.
					
					alert("result.entries.length = " + result.entries.length);
					
					for (var i = 0; i < result.entries.length; i++) {
						var entry = result.entries[i];
						html += '<p><a href="' + entry.url + '">' + entry.title + '</a></p>';
					}
					container.innerHTML = html;
				}
			}

			google.setOnLoadCallback(OnLoad);
		</script>

	</head>

	<body>
    	<div id="feed"></div>
	</body>

</html>